package wzh.crm.ui;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TabHost;
import android.widget.TextView;

import wzh.crm.R;
import wzh.crm.vo.Vo;

public class OverviewActivity<T extends Vo> extends AppCompatActivity {
    static protected final int REQUEST_CODE_MODEL=1;
    protected T model;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_overview);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        model= (T) this.getIntent().getSerializableExtra("MODEL");
        displayModel();

        TabHost tabHost= (TabHost) findViewById(R.id.overview_tabhost);
        tabHost.setup();
        initTabHost(tabHost);

    }

    protected void setDetails(String details){
        TextView view= (TextView) findViewById(R.id.overview_title_details);
        view.setText("\n    "+details);
    }

    protected void displayModel(){

    }

    protected void initTabHost(TabHost tabHost){

    }

}
